package com.ts.boot.common;

import java.util.HashMap;
import java.util.Map;

public class CityCodeUtil {

    static Map<String,String> map;

    static String [][]cityCode =
            //国内
            {{"阿克苏","aku"},{"阿勒泰","aat"},{"安康","aka"},{"安庆","aqg"},{"鞍山","aog"},{"保山","bsd"},{"包头","bav"},
                    {"昌都","bpx"},{"北海","bhy"},{"北京","bjs"},{"蚌埠","bfu"},{"长春","cgq"},{"常德","cgd"},{"长沙","csx"},
                    {"长治","cih"},{"常州","czh"},{"朝阳","chg"},{"成都","ctu"},{"赤峰","cif"},{"重庆","ckg"},{"达州","dax"},
                    {"迪庆","dig"},{"大连","dlc"},{"大理","dlu"},{"丹东","ddg"},{"大同","dat"},{"张家界","dyg"},{"敦煌","dnh"},
                    {"恩施","enh"},{"克拉科夫","krk"},{"富蕴","fyn"},{"锦州","jnz"},{"赣州","kow"},{"格尔木","goq"},{"广汉","ghn"},
                    {"广州","can"},{"桂林","kwl"},{"贵阳","kwe"},{"哈尔滨","hrb"},{"海口","hak"},{"海拉尔","hld"},{"哈密","hmi"},
                    {"杭州","hgh"},{"汉中","hzg"},{"合肥","hfe"},{"黑河","hek"},{"衡阳","hny"},{"和田","htn"},{"香港","hkg"},
                    {"黄山","txn"},{"台州","hyn"},{"呼和浩特","het"},{"佳木斯","jmu"},{"嘉峪关","jgn"},{"吉林","jil"},{"济南","tna"},
                    {"济宁","jng"},{"景德镇","jdz"},{"西双版纳","jhg"},{"晋江","jjn"},{"福州","foc"},{"酒泉","chw"},{"九江","jiu"},
                    {"克拉玛依","kry"},{"喀什","khg"},{"库尔勒","krl"},{"昆明","kmg"},{"库车","kca"},{"兰州","lhw"},{"临沧","lnj"},
                    {"拉萨","lxa"},{"连云港","lyg"},{"丽江","ljg"},{"临沂","lyi"},{"柳州","lzh"},{"洛阳","lya"},{"泸州","lzo"},
                    {"澳门","mfm"},{"芒市","lum"},{"梅县","mxz"},{"牡丹江","mdg"},{"绵阳","mig"},{"南昌","khm"},{"南充","nao"},
                    {"南京","nkg"},{"南宁","nng"},{"南通","ntg"},{"南阳","nny"},{"嫩江","nnn"},{"宁波","ngb"},{"且末","iqm"},
                    {"青岛","tao"},{"庆阳","iqn"},{"秦皇岛","shp"},{"齐齐哈尔","ndg"},{"衢州","juz"},{"三亚","syx"},{"上海","sha"},
                    {"上海浦东","pvg"},{"揭阳","swa"},{"沙市","shs"},{"深圳","szx"},{"沈阳","she"},{"石家庄","sjw"},{"普洱","sym"},
                    {"苏州","szv"},{"塔城","tcg"},{"太原","tyn"},{"天津","tsn"},{"通化","tnh"},{"通辽","tgo"},{"铜仁","ten"},
                    {"万州","wxh"},{"潍坊","wef"},{"威海","weh"},{"温州","wnz"},{"武汉","wuh"},{"卡塔赫纳","ctg"},{"乌兰浩特","hlh"},
                    {"乌鲁木齐","urc"},{"武夷山","wus"},{"梧州","wuz"},{"厦门","xmh"},{"西安","xiy"},{"襄阳","xfn"},{"西昌","xic"},
                    {"锡林浩特","xil"},{"西宁","xnn"},{"徐州","xuz"},{"延安","eny"},{"延吉","ynj"},{"烟台","ynt"},{"宜宾","ybp"},
                    {"宜昌","yih"},{"银川","inc"},{"伊宁","yin"},{"义乌","yiw"},{"榆林","uyn"},{"昭通","zat"},{"湛江","zha"},
                    {"郑州","cgo"},{"舟山","hsn"},{"珠海","zuh"},{"遵义","zyi"},{"台北","tsa"},{"桃园","tpe"},{"台南","tnn"},
                    {"高雄","khh"},{"台东","ttg"},{"花莲","hun"},{"嘉义","cyi"},{"黄金海岸","ool"},{"九寨沟","jzh"},{"无锡","wux"},
                    {"北京南苑","nay"},{"那拉提","nlt"},{"林芝","lzy"},{"乌海","wua"},{"攀枝花","pzi"},{"满洲里","nzh"},{"康定","kgt"},
                    {"怀化","hjj"},{"邯郸","hdg"},{"盐城","ynz"},{"安顺","ava"},{"百色","aeb"},{"文山","wnh"},{"玉树","yus"},
                    {"荔波","llb"},{"喀纳斯","kji"},{"鄂尔多斯","dsn"},{"黎平","hzh"},{"漠河","ohe"},{"长白山","nbs"},{"腾冲","tcz"},
                    {"中卫","zhy"},{"运城","ycu"},{"东营","doy"},{"天水","thq"},{"长海","cni"},{"兴义","acx"},
                    //国际
                    {"渥太华","yow"},{"华盛顿","was"},{"伦敦","lon"},{"布鲁塞尔","bru"},{"卢森堡","lux"},{"阿姆斯特丹","ams"},
                    {"哥本哈根","cph"},{"柏林","ber"},{"巴黎","par"},{"伯尔尼","brn"},{"马德里","mad"},{"罗马","rom"},{"维也纳","vie"},
                    {"德黑兰","thr"},{"耶路撒冷","jrd"},{"开罗","cai"},{"喀士穆","krt"},{"汉城","sel"},{"东京","tyo"},{"马尼拉","mnl"},
                    {"吉隆坡","kul"},{"雅加达","jkt"},{"胡志明市","sgn"},{"万象","vte"},{"曼谷","bkk"},{"新德里","del"},{"伊斯兰堡","isb"},
                    {"堪培拉","cbr"},{"惠灵顿","wlg"},{"利特尔顿","chc"}
            };

    static{
        map = new HashMap<>();
        for(int i = 0;i<cityCode.length;i++){
            map.put(cityCode[i][0],cityCode[i][1]);
        }
    }

    public static String getCityCode(String city){
        return map.get(city);
    }
}
